alien_colors = ["green", "yellow", "red"]

print("test1=====>")
target_color = "green"

for alien_color in alien_colors:
    if target_color == alien_color:
        print("hit success, player win 5 point")
    else:
        print("hit fail")

print("\ntest2=====>")
for alien_color in alien_colors:
    if "green" == alien_color:
        print("hit green, player win 5 point")
    else:
        print("hit not green, player win 10 point")

print("\ntest3=====>")
for alien_color in alien_colors:
    if "green" == alien_color:
        print("hit green, player win 5 point")
    elif "yellow" == alien_color:
        print("hit yellow, player win 10 point")
    else:
        print("hit red, player win 15 point")

print("\ntest4=====>")
age = 13
if age < 2:
    print("婴儿")
elif (age >= 2) and (age < 13):
    print("儿童")
elif (age >= 13) and (age < 20):
    print("少年")
elif (age >= 20) and (age <65):
    print("成年人")
else:
    print("老年人")

print("\ntest5=====>")
user_names = ["mlp", "admin", "peter", "lxm", "zy"]
input_name = "admin"
for user in user_names:
    if input_name == user:
        print("hello, " + user + " would you like to see a status report?")
    else:
        print("hello, " + user + " thank you for logging in again")

print("\ntest6=====>")
user_names = []
input_name = "admin"
if user_names == []:
    print("we need to find some users")
else:
    for user in user_names:
        if input_name == user:
            print("hello, " + user + " would you like to see a status report?")
        else:
            print("hello, " + user + " thank you for logging in again")

print("\ntest7=====>")
nums = list(range(1,10))
print(nums)

for num in nums:
    if num == 1:
        suffix = "st"
    elif num == 2:
        suffix = "nd"
    elif num == 3:
        suffix = "rd"
    else:
        suffix = "th"
    print(str(num) + suffix)
